import * as roleApi from '@/api/role';
export default {
    namespaced: true,
    state: {
        roleList: [],
    },
    mutations: {
        SET_ROLE_INFO(state, newValue) {
            state.departmentList = newValue
        },
    },
    actions: {
        async updateDepartmentList(context) {
            const res = await departmentApi.getDepartment()
            context.commit('SET_DEPARTMENT_INFO', res.data.data.depts)
            console.log(res);
        },
        async updateEmployeeInfo(context) {
            const res = await departmentApi.getEmployeeSimple()
            context.commit('SET_EMPLOYEE_INFO', res.data.data)
            console.log(res);
        },
    }
}